<div class="payment-detail" *ngIf="payment; else empty">
	<div class="header">
		<div class="title">
			<span class="doc-no">{{ title }}</span>
			<span class="status">
				<d-badge [showDot]="true" [status]="statusType"></d-badge>
				<span class="status-text">{{ statusLabel }}</span>
			</span>
		</div>
		<div class="sub">创建：{{ getField(payment,'creationDate','—') }}（{{ getField(payment,'creator','—') }}）
			<ng-container *ngIf="payment.confirmDate || payment.confirmer">
				｜ 审核：{{ getField(payment,'confirmDate','—') }}（{{ getField(payment,'confirmer','—') }}）
			</ng-container>
		</div>
	</div>

	<div class="section" *ngIf="order">
		<div class="section-title">订单信息</div>
		<div class="gride two-col">
			<div class="item"><label>订单号</label><div>{{ getField(order,'saleOrderNum') }}</div></div>
			<div class="item"><label>客户</label><div>{{ getField(order,'customerName') }}</div></div>
			<div class="item"><label>下单日期</label><div>{{ getField(order,'orderDate') }}</div></div>
			<div class="item"><label>交货日期</label><div>{{ getField(order,'deliveryDate') }}</div></div>
			<div class="item"><label>订单金额</label><div>{{ formatAmount(order.totalAmountWithTax) }}</div></div>
			<div class="item"><label>已收/未收</label><div>{{ formatAmount(order.receivedAmount) }} / {{ formatAmount(order.unpaidAmount) }}</div></div>
		</div>
	</div>

	<div class="section">
		<div class="section-title">收款信息</div>
		<div class="gride two-col">
			<div class="item"><label>收款单号</label><div>{{ getField(payment,'paymentNum') }}</div></div>
			<div class="item"><label>收款日期</label><div>{{ getField(payment,'paymentDate') | date:'yyyy-MM-dd HH:mm' }}</div></div>
			<div class="item"><label>收款方式</label><div>{{ getField(payment,'paymentType') }}</div></div>
			<div class="item"><label>结算方式</label><div>{{ getField(payment,'settlementMethod') }}</div></div>
			<div class="item"><label>收款账户</label><div>{{ getField(payment,'paymentAccount') }}</div></div>
			<div class="item"><label>应收金额</label><div>{{ formatAmount(payment.receiptAmount) }}</div></div>
			<div class="item"><label>优惠金额</label><div>{{ formatAmount(payment.discountAmount) }}</div></div>
			<div class="item"><label>实收金额</label><div>{{ formatAmount(payment.actualAmount) }}</div></div>
			<div class="item wide"><label>备注</label><div>{{ getField(payment,'remark') }}</div></div>
		</div>
	</div>
</div>

<ng-template #empty>
	<div class="empty">
		<i class="icon icon-info-o"></i>
		暂无数据
	</div>
	<div class="hint">请从“销售台账”收款单列表点击“详情”打开本弹窗。</div>
	</ng-template>
